﻿#include <iostream>
using namespace std;
class Person
{
public:
	string       m_name;
	int            m_age;
	char         m_memo[50];
	Person()                                               //无参构造器
	{
		m_name.clear(); m_age = 0; memset(m_memo, 0, sizeof(m_memo));
		cout << "调用了Person构造函数。\n";
	}
	~Person()
	{
		cout << "调用了~Person()\n";
	}
	void show();
};

void Person::show()
{
	cout << "姓名：" << this->m_name << ",年龄：" << this->m_age << ",备注" << this->m_memo << endl;
}
int main()
{
	Person p1;
	p1.m_name = "三毛"; p1.m_age = 30;
	//Person p2(p1);
	Person p2 = p1;
	p2.show();
}